<template>
    <!-- 微页面组件 -->
    <div class="MicroPageContainer">
        <!-- 不知道是个什么玩意 -->
        <temp-config 
            v-if="pageInfo.type == 'config'"
            :bgcolor="pageInfo.bgcolor"
        ></temp-config>
        <!-- 店招模块 -->
        <temp-store-banner 
            :storeBannerInfo="pageInfo"
            v-if="pageInfo.type == 'storebanner' ? true : false"
        ></temp-store-banner>
        <!-- 优惠劵 -->
        <temp-coupon 
            :couponInfo="pageInfo"
            v-if="pageInfo.type == 'coupon' ? true : false"
        ></temp-coupon>
        <!-- 商品 -->
        <temp-product 
            :productInfo="pageInfo"
            v-if="pageInfo.type == 'product' && pageInfo.productLayout != 3 ? true : false"
        ></temp-product>
        <!-- 商品的卡片状态 -->
        <my-card
            :productInfo="pageInfo"
            v-if="pageInfo.type == 'product' && pageInfo.productLayout == 3 ? true : false"
        ></my-card>
        <!-- 视频组件 -->
        <temp-video 
            :videoInfo="pageInfo"
            v-if="pageInfo.type == 'video' ? true : false"        
        ></temp-video>
        <!-- 富文本组件 -->
        <temp-rick
            :rickInfo="pageInfo"
            v-if="pageInfo.type == 'rich_text' ? true : false"
        ></temp-rick>
        <!-- 辅助空白 -->
        <temp-white
            :whiteInfo="pageInfo"
            v-if="pageInfo.type == 'white' ? true : false"
        ></temp-white>
        <!-- 辅助线 -->
        <temp-line
            :lineInfo="pageInfo"
            v-if="pageInfo.type == 'line' ? true : false"
        ></temp-line>
        <!-- 图片热区 -->
        <temp-img-hot
            :imgHotInfo="pageInfo"
            v-if="pageInfo.type == 'image-hot' ? true : false"
        ></temp-img-hot>
        <!-- 图文导航 -->
        <temp-img-nav
            :imgNavInfo="pageInfo"
            v-if="pageInfo.type == 'image-nav' ? true : false"
        ></temp-img-nav>
        <!-- 图文广告 -->
        <temp-img-ad
            :imgAdInfo="pageInfo"
            v-if="pageInfo.type == 'image-ad' ? true : false"
        ></temp-img-ad>
    </div>
</template>

<script>
// 引入 模板
import TempConfig from 'Components/template/TempConfig'
import TempCoupon from 'Components/template/TempCoupon'
import TempProduct from 'Components/template/TempProduct'
import TempStoreBanner from 'Components/template/TempStoreBanner'
import TempVideo from 'Components/template/TempVideo'
import TempRick from 'Components/template/TempRick'
import TempWhite from 'Components/template/TempWhite'
import TempLine from 'Components/template/TempLine'
import TempImgHot from 'Components/template/TempImgHot'
import TempImgNav from 'Components/template/TempImgNav'
import TempImgAd from 'Components/template/TempImgAd'
import MyCard from 'Components/common/MyCard'

export default {
    props: ['pageInfo'],
    components: {
        TempConfig,
        TempCoupon,
        TempProduct,
        TempStoreBanner,
        TempVideo,
        TempRick,
        TempWhite,
        TempLine,
        TempImgHot,
        TempImgNav,
        TempImgAd,
        MyCard
    }
}
</script>

<style lang="stylus">

</style>
